<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.LinkedList"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Calendar"%>
<%@page import="dktc_ws.Tintuc" %>
<%@page import="GetData.DataWS"%>

<h1>CẬP NHẬT TIN TỨC</h1>

<%
 request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
    DataWS a = new DataWS();
    Tintuc news = new Tintuc();
    news.setMatintuc(Integer.parseInt(request.getParameter("id").trim()));
    List<Tintuc> listnews = a.laydanhsachtintuc(news.getMatintuc());
    news = listnews.get(0);
%>

<form action="news/edit_news_post.jsp" method="post">
    <table>
        <tr><td><input type="hidden" name="matintuc" value=" <%=news.getMatintuc()%>"/></td></tr>
        <tr> 
            <td>TIÊU ĐỀ:</td><td><input type="text" name="tieude" value ="<%=news.getTuade()%>"/> </td>
        </tr>
        <tr> 
        <td>MÔ TẢ NGẮN:</td><td><textarea rows="2" name="motangan"><%=news.getMotangan()%></textarea> </td>
        </tr>
        <tr> 
            <td>NỘI DUNG:</td><td><textarea row="5" name="noidung"><%=news.getNoidung()%></textarea> </td>
        </tr>
    <tr> 
            <td></td><td>  <input type="submit" name="editnews" value="Cập nhật"/></td>
        </tr>
   
    </table>
</form>